package com.arron.vistor;

public class SoftwareDepartment extends Department{
    @Override
    public void visit(FulltimeEmployee employee) {
        int workTime = employee.getWorkTime();
        String score="";
        if(workTime>=40){
            score="绩效好";
        } else if(workTime<40){
            score ="绩效差";
        }
        System.out.println("正式员工"+employee.getName()+"实际绩效为："+score);
    }

    @Override
    public void visit(ParttimeEmployee employee) {
        int workTime = employee.getWorkTime();
        String score="";
        if(workTime>=20){
            score="绩效好";
        } else if(workTime<20){
            score ="绩效差";
        }
        System.out.println("临时员工"+employee.getName()+"实际绩效为："+score);
    }
}
